WIP: Ability to remove the item operation#2954
Conversation
|
For the record, the correct term is blank node identifier, not "blank IRI" 😛 But yeah, this seems like the right way forward. |
|
@soyuka Any update on this? I think it would be really great to easily be able to completely disable the REST API if you're only interested in GraphQL. Leaving it enabled forces me to duplicate security related configuration at the moment 😕 |
I need to continue working on this, I can make a priority out of this next week! |
|
@soyuka Thank you very much, that would be awesome 🎉 |
|
Superseeded by #3079 although blank node identifiers may still be an interesting feature. |
This is a proposal to make resources work without a defined GET item operation. When it fails we should fallback to a blank IRI instead of resulting in a 400 error.
Note that I think that we should make this behavior configurable. If we decide that it should be the default behavior maybe a configuration to keep the old behavior?
About the implementation:
getSafeIriFromItemthat never throws (means to add a new interface that extends the current one)This definitely breaks some current behavior but I think that it also makes ApiPlatform less strict regarding this item operation. The only solution for now is to decorate the IriConverter with our own where it patches these kind of Resources. Also, by using a blank iri we enforce a good practice regarding JSON-LD.